import json

from data.app import app_path
"""
准备测试数据
"""
data = [
    ({"mobile": "13800000002", "password": "123456"}, [200, True, 10000, "登录成功"]),
    ({"mobile": "13800000002", "password": "123457"}, [200, False, 10000, "用户名或密码错误"]),
    ({"mobile": "13399999999", "password": "123456"}, [200, False, 10000, "用户名或密码错误"]),
    ({"mobile": None, "password": "123456"}, [200, False, 10000, "用户名或密码不能为空"]),
    ({"mobile": "13800000002", "password": None}, [200, False, 10000, "用户名或密码不能为空"])
]

with open(app_path + "/data/login_data.json", "w", encoding="utf-8") as f:
    json.dump(data, f, indent=2, ensure_ascii=False)
